package com.openvas.commons.common.exception.pojo;

import lombok.Getter;
import net.sf.jsqlparser.expression.DateTimeLiteralExpression;

import java.util.Date;


/**
 * 异常结果封装类
 */
@Getter
public class ExceptionResult{
    private Integer status;
    private String message;
    private String timestamp;

    public ExceptionResult(Integer status,String message){
        this.status = status;
        this.message = message;
        this.timestamp = (new Date()).toString();
    }

    public ExceptionResult(ZmException e){
        this.status = e.getStatus();
        this.message = e.getMessage();
        this.timestamp = (new Date()).toString();
    }
}
